# coding=utf-8

'''
Created on 2014年3月2日

@author: Administrator
'''
a = 1
def foo1():
    #a = 1
    
    print a
#全并两个数组的测试    
def listtest():
    a = [1,2,3]
    b = [4,5,6]
    a += b
    print a
def optDic():
    a = [{"a":1,"b":2}]
    d = a[0]
    d["c"] = 5
    a[0] = d
    print a
def uniqueList():
    L = [{"c":"china","b":"aaaa","d":1},{"c":"us","b":"aaaa","d":1},{"c":"china","b":"aaaa","d":1}]
    (output, temp) = ([],[])
   
    for l in L:
        for k, v in l.iteritems():
            flag = False
            if (k,v) not in temp:
                flag = True
                break
        if flag:
            output.append(l)
            temp.extend(l.items())
    print output
    print temp
def dictest():
    L = [{"c":"china","b":"aaaa","d":1},{"c":"us","b":"aaaa","d":1},{"c":"china","b":"aaaa","d":1}]
    for l in L:
        print l.items()
          
if __name__ == '__main__':
    uniqueList()